#include <iostream>
#include <vector>
using namespace std;

vector<int> memo;

int halfSet(int n)
{
    if (memo[n] != 0)
    {
        return memo[n];
    }
    int sum = 1;
    for (int i = 1; i <= n / 2; ++i)
    {
        sum += halfSet(i);
    }
    memo[n] = sum;
    return sum;
}
int main()
{
    int n;
    cin >> n;
    memo.resize(n + 1, 0);
    cout << halfSet(n) << endl;

    return 0;
}

#include <iostream>
#include <vector>
using namespace std;

vector<int> memo;

int halfSet(int n)
{
    if (memo[n] != 0)
    {
        return memo[n];
    }
    int sum = 1;
    for (int i = 1; i <= n / 2; ++i)
    {
        sum += halfSet(i);
    }
    memo[n] = sum;
    return sum;
}
int main()
{
    int n;
    while (cin >> n)
    {
        memo.resize(n + 1, 0);
        cout << halfSet(n) << endl;
    }



    return 0;
}